{% extends "base.html" %}
{% block content %}

<div class="row" style="overflow:hidden; text-overflow:ellipsis;">
	<div class="col-md-10">
		<div class="box">
			<div class="box-header with-border">
				<h3 class="box-title">--</h3>
			</div><!-- /.box-header -->
			<div class="box-body">
				<table class="table table-bordered">
					<tr>
						<th style="width: 10px">#</th>
						<th>标题</th>
						<th>发布时间</th>
						<th>来源</th>
						<th></th>
					</tr>
					{% if bulletins %}
					{% for f in bulletins %}
					<tr>
						<td>
							<img src='{{"/bd/web/static/"+f.bulletinimages.file}}' alt='{{f.bulletinimages.file}}' height="80" width="80"/>
						</td>
						<td>
                            <a href="/view_bulletin?id={{f.id}}">
								{{f.title}}
							</a>
						</td>
						<td>
							{{f.dt}}
						</td>
						<td>
							{{f.source}}
						</td>

						<td>
							<form action="" method="post" name="edit_bulletin" onsubmit="return confirm('确认要提交吗?');">
								<input type="hidden" name="id" value="{{f.id}}">
								{% if current_user.role_id == 1%}<input type="submit" value="删除" name="delete">{% endif%}
							</form>
						</td>
					</tr>
					{% endfor %}
					{% endif %}

				</table>

			</div><!-- /.box-body -->
			<div class="box-footer clearfix">
				<ul class="pagination pagination-sm no-margin pull-right">
					{% if paging %}
					<li><a href="/bd/view_bulletins?page=1">&laquo;</a></li>
					{% for i in range(paging.page_from,paging.page_to+1) %}

					<li><a href="/bd/view_bulletins?page={{i}}">{{i}}</a></li>

					{% endfor %}
					<li><a href="/bd/view_bulletins?page={{paging.total_pages}}">&raquo;</a></li>
					{% endif %}

				</ul>
			</div>
		</div><!-- /.box -->
	</div>
</div>






{% endblock %}
